Skip to content

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Jul 28, 2025

This PR updates the llms.txt file to properly document the import structure for the @lambdacurry/forms library, ensuring all imports follow the correct patterns.

Changes Made

📋 Import Structure Documentation

  • Added clear section explaining the difference between form-aware components and UI components
  • Form-aware components: @lambdacurry/forms (automatically integrate with form context)
  • UI components: @lambdacurry/forms/ui (underlying UI primitives without form integration)

🔧 Updated Import Examples

  • Fixed all import statements throughout the documentation to use correct paths
  • Updated examples to consistently import form-aware components from main package
  • Updated examples to consistently import UI components from /ui subpath

📚 Component Reference Lists

  • Added comprehensive lists of all available components from each import path
  • Included descriptions for each component to clarify their purpose
  • Organized components by category (form inputs, layout, data display, etc.)

🎯 Key Updates

  • Form-aware components (TextField, Checkbox, FormError, etc.) → @lambdacurry/forms
  • UI components (Button, Dialog, Calendar, etc.) → @lambdacurry/forms/ui
  • Updated implementation notes to reflect proper import patterns

This ensures developers have clear guidance on which components to import from which paths, maintaining the library's architectural separation between form logic and UI primitives.

Summary of Changes:

  • llms.txt - Updated import documentation and component references

Requested by Jake Ruesink


💻 View my work🚫 Ban all checksAbout Codegen

Summary by CodeRabbit

  • Documentation
    • Expanded and clarified documentation to detail the import structure and usage of form-aware and UI primitive components.
    • Added comprehensive lists and descriptions of available components.
    • Updated example code and guidance to reflect the new import paths.
    • Revised reminders to clearly distinguish between form-aware and UI component imports.

- Add clear import structure section explaining form-aware vs UI components
- Update all import examples to use correct paths:
  - Form-aware components from @lambdacurry/forms
  - UI components from @lambdacurry/forms/ui
- Add comprehensive component reference lists
- Fix inconsistent import statements throughout documentation
- Update key implementation notes to reflect proper import patterns

Requested by Jake Ruesink
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Jul 28, 2025

Walkthrough

The documentation for the @lambdacurry/forms library was expanded to clarify the distinction between form-aware and UI primitive components, update import examples, and provide comprehensive component reference lists. The changes focus solely on improving documentation and import guidance, with no modifications to functional code or exports.

Changes

Cohort / File(s) Change Summary
Documentation and Import Guidance
llms.txt
Expanded documentation to clarify import structure and component distinctions; updated import examples and reminders; added comprehensive component lists. No code or export changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

In the docs, a rabbit hopped with glee,
Sorting imports for all to see.
Forms here, UI there—
Clear instructions everywhere!
With lists and notes, the path is bright,
Now coding forms just feels right.
🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codegen-bot/update-import-documentation-1753719505

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

📝 Storybook Preview: View Storybook

This preview will be updated automatically when you push new changes to this PR.

Note: The preview will be available after the workflow completes and the PR is approved for deployment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
llms.txt (1)

87-106: Clarify identical component names across packages

TextField, Checkbox, etc. exist in both @lambdacurry/forms (form-aware) and @lambdacurry/forms/ui (UI-only). The docs list them in each section, but new readers could miss this subtle distinction and accidentally mix the two. Add an explicit note (one sentence) warning that the identical names refer to different implementations and recommending aliasing (import { TextField as UITextField }) when using both in one file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42a91f8 and 6856082.

📒 Files selected for processing (1)
  • llms.txt (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: jaruesink
PR: lambda-curry/forms#108
File: llms.txt:94-96
Timestamp: 2025-07-27T21:08:37.677Z
Learning: For the @lambdacurry/forms repository, use top-level imports for ease of implementation rather than specific entry points. Example: `import { TextField, Checkbox, FormError } from '@lambdacurry/forms';` is preferred over individual module imports. This prioritizes developer experience and implementation simplicity.
Learnt from: jaruesink
PR: lambda-curry/forms#108
File: llms.txt:578-579
Timestamp: 2025-07-27T21:10:38.958Z
Learning: The @lambdacurry/forms package exports components at the top level, so `import { FormError, TextField } from '@lambdacurry/forms'` is the correct and preferred import pattern, not component-specific entry points.
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the required imports for Remix Hook Form integration, Zod, and base UI components in form-aware components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/ui-component-patterns.mdc:0-0
Timestamp: 2025-07-06T02:47:43.432Z
Learning: Follow consistent component architecture patterns as established in lambda-curry/forms
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Keep form-aware components separate from base UI components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Use package name imports for published packages (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form')
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/ui/**/*.tsx : Follow the component composition pattern for UI components that accept form integration
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Ensure proper accessibility and validation integration in form components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/*.{tsx,ts} : Form-aware components should be named as ComponentName (e.g., TextField, Checkbox)
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/react-typescript-patterns.mdc:0-0
Timestamp: 2025-07-23T12:47:43.342Z
Learning: Applies to src/{components,hooks}/**/*.{ts,tsx} : Document exported interfaces and components with JSDoc comments including @example usage
llms.txt (24)

Learnt from: jaruesink
PR: #108
File: llms.txt:94-96
Timestamp: 2025-07-27T21:08:37.677Z
Learning: For the @lambdacurry/forms repository, use top-level imports for ease of implementation rather than specific entry points. Example: import { TextField, Checkbox, FormError } from '@lambdacurry/forms'; is preferred over individual module imports. This prioritizes developer experience and implementation simplicity.

Learnt from: jaruesink
PR: #108
File: llms.txt:578-579
Timestamp: 2025-07-27T21:10:38.958Z
Learning: The @lambdacurry/forms package exports components at the top level, so import { FormError, TextField } from '@lambdacurry/forms' is the correct and preferred import pattern, not component-specific entry points.

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Use package name imports for published packages (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form')

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the required imports for Remix Hook Form integration, Zod, and base UI components in form-aware components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Document breaking changes in changelogs

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/ui-component-patterns.mdc:0-0
Timestamp: 2025-07-06T02:47:43.432Z
Learning: Follow consistent component architecture patterns as established in lambda-curry/forms

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use remix-hook-form for form state management and validation

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Import from specific entry points (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form/text-field')

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Ensure proper accessibility and validation integration in form components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to packages/components/src/ui/**/*.{ts,tsx} : Don't import from remix-hook-form package in ui components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Always display field-level errors using FormMessage

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Handle both client-side and server-side validation errors in form components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Provide clear, user-friendly error messages in validation

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/*.{tsx,ts} : Form-aware components should be named as ComponentName (e.g., TextField, Checkbox)

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Clear errors appropriately when fields are corrected

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Follow the wrapper component pattern for all form-aware components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Always define Zod schemas with proper error messages for form validation

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use Zod schemas for all form validation

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the form setup pattern for form initialization in Remix

Learnt from: jaruesink
PR: #107
File: llms.txt:22-23
Timestamp: 2025-07-27T05:55:46.460Z
Learning: React Router 7 merged with Remix, so useFetcher and ActionFunctionArgs are now available from 'react-router' package rather than the separate '@remix-run/react' and '@remix-run/node' packages.

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Maintain FormField consistency for all form inputs

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Keep form-aware components separate from base UI components

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/ui/**/*.tsx : Follow the component composition pattern for UI components that accept form integration

Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use ARIA attributes for complex form interactions

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test

Comment on lines +154 to +196
### Complete List of UI Components (`@lambdacurry/forms/ui`)
```typescript
// Basic UI components (no form integration)
import {
// Buttons and actions
Button, // Button with variants

// Form inputs (non-form-aware versions)
CheckboxField, // Checkbox without form integration
TextareaField, // Textarea without form integration
TextField, // Text input without form integration
SwitchField, // Switch without form integration
RadioGroupField, // Radio group without form integration
DatePickerField, // Date picker without form integration
DropdownMenuSelectField, // Dropdown without form integration
OtpInputField, // OTP input without form integration
FormErrorField, // Error display without form integration

// Layout and navigation
Dialog, // Modal dialogs
Popover, // Popover/tooltips
Tabs, // Tab navigation
Separator, // Visual dividers

// Data display
Table, // Table components
Badge, // Labels and badges
Calendar, // Calendar component

// Form primitives
Label, // Basic labels
Select, // Basic select dropdown
Slider, // Range slider
Command, // Command palette

// Data table system
DataTable, // Data table components
DataTableFilter, // Table filtering

// Utilities
DebouncedInput, // Debounced input
} from '@lambdacurry/forms/ui';
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify that every UI component in the reference list actually exists in the published package

The list includes FormErrorField, CheckboxField, RadioGroupField, etc. Some of these wrappers may not be exported yet (or may use different names). A mismatch will break copy-pasted examples.

Run this quick check to confirm exports against the current package build:


🏁 Script executed:

#!/bin/bash
# lists exports from the installed package bundle
npm pack @lambdacurry/forms --silent
tar -xzf lambdacurry-forms-*.tgz
fd --extension ts -E 'node_modules' -x sed -n 's/^export .* \(.*\) .*/\1/p' {} \; | sort -u | grep -E 'FormErrorField|CheckboxField|RadioGroupField'

Length of output: 259


🏁 Script executed:

#!/bin/bash
# Download and unpack the published package
npm pack @lambdacurry/forms --silent
tar -xzf lambdacurry-forms-*.tgz

# Detect top-level package directory inside the tarball
PKG_DIR=$(tar -tzf lambdacurry-forms-*.tgz | head -1 | cut -d/ -f1)
echo "Inspecting exports in $PKG_DIR/"

# Search across all files for the specific exports
for name in FormErrorField CheckboxField RadioGroupField; do
  echo "Checking export for $name:"
  grep -R "export .*${name}" "$PKG_DIR" -n || echo "$name not found"
done

Length of output: 2123


Update UI imports to match actual exports

I confirmed in @lambdacurry/forms v0.18.0 that:

  • FormErrorField → exported as FormErrorField
  • RadioGroupField → exported as RadioGroupField
  • CheckboxField → not exported (the component is exported as Checkbox)

Please adjust your import list in llms.txt (lines 154–196) accordingly, and verify the remaining field wrappers (e.g. TextareaField, DatePickerField, DropdownMenuSelectField, OtpInputField) align with their actual export names in @lambdacurry/forms/ui.

  • Rename CheckboxField to Checkbox
  • Confirm each component name matches the package’s dist/ui/index.d.ts exports
🤖 Prompt for AI Agents
In llms.txt between lines 154 and 196, update the import statements from
'@lambdacurry/forms/ui' to reflect the actual exported component names in
version 0.18.0. Specifically, rename CheckboxField to Checkbox, and verify that
all other imported components such as TextareaField, DatePickerField,
DropdownMenuSelectField, OtpInputField, and RadioGroupField exactly match their
export names in the package's dist/ui/index.d.ts file. Adjust any mismatches to
ensure the import list is accurate and consistent with the package exports.

Comment on lines +900 to 902
import { Button } from '@lambdacurry/forms/ui';
import { DropdownMenuSelectItem } from '@lambdacurry/forms/ui';
import { RemixFormProvider, useRemixForm, getValidatedFormData, createFormData } from 'remix-hook-form';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing FormError import breaks the comprehensive example

<FormError /> is used later on line 1109, but the import statement on 890-902 omits it, causing a compile-time error.

-import { 
-  TextField, 
-  Textarea, 
-  Checkbox, 
-  RadioGroup, 
-  DatePicker,
-  DropdownMenuSelect 
-} from '@lambdacurry/forms';
+import { 
+  TextField, 
+  Textarea, 
+  Checkbox, 
+  RadioGroup, 
+  DatePicker,
+  DropdownMenuSelect,
+  FormError              // <-- add
+} from '@lambdacurry/forms';

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In llms.txt around lines 900 to 902, the import statements from
'@lambdacurry/forms/ui' are missing the FormError component, which is used later
on line 1109. To fix this, add FormError to the import list from
'@lambdacurry/forms/ui' alongside Button and DropdownMenuSelectItem to ensure
the component is properly imported and avoid compile-time errors.

@jaruesink jaruesink merged commit 5e92efd into main Aug 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants